<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:body>
	<p:dialog id="dlgModalFormaPag1"
		header="#{message.header_consulta_forma}" widgetVar="dlgModalFormaPag"
		modal="true">

		<div>
			<h:form id="formCabecaForma">
				<h:panelGrid columns="2">

					<h:panelGrid columns="1">
						<p:selectOneMenu
							value="#{formaPagamentoModalPesquisaTela.valorCombo}">
							<f:selectItem itemLabel="#{message.label_metodo_pag}"
								itemValue="METODO" />
							<f:selectItem itemLabel="#{message.label_codigo}"
								itemValue="CODIGO" />
						</p:selectOneMenu>
					</h:panelGrid>

					<h:panelGrid columns="1" style="margin-left: 15px;">
						<p:commandButton icon="ui-icon-search"
							action="#{formaPagamentoModalPesquisaTela.pesquisarFormaPagamento}"
							update=":formFormas,:messages">
							<p:inputText size="30"
								value="#{formaPagamentoModalPesquisaTela.descricao}" />
						</p:commandButton>
					</h:panelGrid>

				</h:panelGrid>
			</h:form>
		</div>
		<div style="margin-top: 10px;">
			<h:form id="formFormas">
				<p:dataTable var="forma" rows="10" paginator="true"
					paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
					value="#{formaPagamentoModalPesquisaTela.listaFormaModel}"
					emptyMessage="#{message.table_empty}" selectionMode="single"
					selection="#{formaPagamentoModalPesquisaTela.forma}">
					<p:ajax event="rowSelect" oncomplete="dlgModalFormaPag.hide()"
						update=":formCadCot:idFormPag" />
					<p:column headerText="#{message.label_codigo}">#{forma.idFormaPag}</p:column>
					<p:column headerText="#{message.label_metodo_pag}">#{forma.metodoPag}</p:column>
					<p:column headerText="#{message.label_forma_pag}">#{forma.formaPag}</p:column>
				</p:dataTable>
			</h:form>
		</div>

	</p:dialog>
</h:body>
</html>

